<extend name="Public:common"/>
<block name="main">
    <form class="am-form am-form-horizontal" method="post" data-am-validator="H5validation:false">
        <fieldset id="accordion">
            <legend>新建资金账户</legend>
            <div class="am-input-group">
                <span class="am-input-group-label"><b>名称</b></span>
                <input type="text" class="am-form-field" id="text-funds" name="funds_name" placeholder="输入资金账户名称">
            </div>
            <p><input type="submit" class="am-btn am-btn-secondary am-btn-block" name="funds_submit" value="新建"></p>
        </fieldset>
    </form>

    <p></p>
    <fieldset id="accordion">
        <legend>管理资金账户</legend>
        <table class="am-table am-table-bordered am-table-radius am-table-striped am-table-centered am-text-sm">
            <thead>
                <tr>
                    <th width='80' bgcolor="#FFFFFF">资金账户</th>
                    <th width='80' bgcolor="#FFFFFF">收入金额</th>
                    <th width='80' bgcolor="#FFFFFF">支出金额</th>
                    <th width='80' bgcolor="#FFFFFF">剩余金额</th>
                    <th width='80' bgcolor="#FFFFFF">记录数</th>
                    <th width='80' bgcolor="#FFFFFF">编辑</th>
                </tr>
            </thead>
            <tbody class="">
                <volist name="ShowData" id="data">
                <tr>
                    <td class="am-text-middle">{$data.name}</td>
                    <td class="am-text-middle money-format">{$data.money.in}</td>
                    <td class="am-text-middle money-format">{$data.money.out}</td>
                    <td class="am-text-middle money-format">{$data.money.over}</td>
                    <td class="am-text-middle">{$data.money.count}</td>
                    <td class="am-text-middle">
                        <if condition="$data.id eq -1 ">
                            <a href="javascript:void(0);" onclick="alert('默认资金账户无法编辑。');">编辑</a> 
                        <else />
                            <php>
                                echo "<a href=".U("Home/Funds/edit?id=".$data['id']).">编辑</a>";
                            </php>
                        </if>
                    </td>
                </tr>
                </volist>
            </tbody>
        </table>
    </fieldset>
</block>